import requests
import pytest
from config import readconfig
reada= readconfig.Read()

@pytest.fixture(scope='session')
def testcrm():
    cdata={'username': '18812345678','password': 123456}
    ccurl=reada.get_crm('curl')
    # tim=reada.get_crm('timeout')
    r=requests.post(ccurl+'/login',data=cdata)
    print(r.json())
    gg=r.json()
    tk=gg['Admin-Token']
    print(tk)
    return tk
# testcrm()




